#!/usr/bin/env python
# -*- coding:utf-8 -*-
from flask import Flask, render_template
from Web.Service import SessionService
from datetime import datetime,timedelta
from Web.Tools import mysqlTool
import os
from Web.Controller.bbs import bbs
from Web.Controller.usercenter import usercenter
from Web.Pojo.User import User
from flask_sqlalchemy import SQLAlchemy
from __init__ import app
#session


#扩展文件名和虚拟目录
app.register_blueprint(bbs, url_prefix='/bbs')
app.register_blueprint(usercenter, url_prefix='/bbs')

@app.route('/')
def home():
    users = mysqlTool.execute( "select * from db" , User )
    return render_template('home.html',usermen = users)

if __name__ == '__main__':
    app.run()